# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Maintainer: Charles Mauch <cmauch@gmail.com>

pkgname=perl-curses-ui
pkgver=0.9609
pkgrel=10
pkgdesc="Perl/CPAN Module Curses::UI"
arch=("any")
url="https://search.cpan.org/dist/Curses-UI/"
license=("GPL" "PerlArtistic")
makedepends=("perl-curses" "perl-term-readkey" "perl-test-pod")
depends=("ncurses" "perl-curses" "perl-term-readkey" "perl-test-pod")
source=("https://search.cpan.org/CPAN/authors/id/M/MD/MDXI/Curses-UI-$pkgver.tar.gz"
	Curses-UI-0.9607.utf8fix.diff)
sha256sums=('0ab827a513b6e14403184fb065a8ea1d2ebda122d2178cbf45c781f311240eaf'
            '19a6a3e48ae15942fedc658a590e8a21fde23ead22300d2406379db8df000dca')

build() {
  cd "$srcdir"/Curses-UI-$pkgver
  patch -p1 <"$srcdir"/Curses-UI-0.9607.utf8fix.diff
  PERL_USE_UNSAFE_INC=1 \
  PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
  make
}

package() {
  cd "$srcdir"/Curses-UI-$pkgver
  make pure_install doc_install DESTDIR="$pkgdir"
  find "$pkgdir" -name '.packlist' -delete
  find "$pkgdir" -name '*.pod' -delete
}
